<html>
<head>
<script language="javascript" type="text/javascript"
	src="js/jquery-1.7.2.min.js"></script>
</head>
<body>
	<div id="output"></div>

	<script language="javascript" type="text/javascript">
  $(function () 
  {
    $.ajax({                                      
      url: 'api.php',                  //the script to call to get data          
      data: "",                        //you can insert url argumnets here to pass to api.php for example "id=5&parent=6"
      dataType: 'html',                //data format      
      success: function(data)          //on recieve of reply
      {
        $('#output').innerHTML(data);  //Set output element html
      } 
    });
  
  }); 
  </script>
</body>
</html>
